﻿CREATE TABLE [dbo].[FinanceMonthTable_PZ] (
    [id]            INT              IDENTITY (1, 1) NOT NULL,
    [GId]           UNIQUEIDENTIFIER CONSTRAINT [DF_FinanceMonthTable_PZ_GId] DEFAULT (newid()) NULL,
    [Companyid]     INT              NULL,
    [CompanyName]   NVARCHAR (200)   CONSTRAINT [DF_FinanceMonthTable_PZ_CompanyName] DEFAULT ('') NULL,
    [TypeId]        INT              CONSTRAINT [DF_FinanceMonthTable_PZ_Type] DEFAULT ((0)) NULL,
    [CateTwoId]     INT              CONSTRAINT [DF_FinanceMonthTable_PZ_CateTwoId] DEFAULT ((0)) NULL,
    [SubjectId]     INT              CONSTRAINT [DF_FinanceMonthTable_PZ_SubjectId] DEFAULT ((0)) NULL,
    [OrderType]     INT              CONSTRAINT [DF_FinanceMonthTable_PZ_OrderType] DEFAULT ((0)) NULL,
    [AccountType]   INT              CONSTRAINT [DF_FinanceMonthTable_PZ_AccountType] DEFAULT ((0)) NULL,
    [Money]         DECIMAL (18, 2)  CONSTRAINT [DF_FinanceMonthTable_PZ_Money] DEFAULT ((0)) NULL,
    [CreateDate]    DATETIME         CONSTRAINT [DF_FinanceMonthTable_PZ_lrdate] DEFAULT (getdate()) NULL,
    [userid]        VARCHAR (50)     NULL,
    [username]      NVARCHAR (50)    NULL,
    [AuditUserid]   VARCHAR (50)     CONSTRAINT [DF_FinanceMonthTable_PZ_AuditUserid] DEFAULT ('') NULL,
    [AuditUserName] NVARCHAR (50)    CONSTRAINT [DF_FinanceMonthTable_PZ_AuditUserName] DEFAULT ('') NULL,
    [Reason]        NVARCHAR (3000)  CONSTRAINT [DF_FinanceMonthTable_PZ_remark] DEFAULT ('') NULL,
    CONSTRAINT [PK_FinanceMonthTable_PZ] PRIMARY KEY CLUSTERED ([id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'平整的项目(1支出,2收入,3成单,4,5)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'TypeId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'财务支出二级科目 支出专用', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'CateTwoId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'财务支出三级科目 支出专用', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'SubjectId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'成单专用。（1新增成单额，2续费成单额，3新增毛利，4续费毛利，5，6）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'OrderType';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'收入科目  收入专用', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'AccountType';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'平整的金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'Money';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'平整时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'CreateDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'操作人编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'userid';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'操作人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'username';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批人', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'AuditUserid';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'备注', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FinanceMonthTable_PZ', @level2type = N'COLUMN', @level2name = N'Reason';

